﻿using UnityEngine;

namespace HurricanePackage
{
    /// <summary>
    ///UGUI窗体基类
    /// </summary>
    /// <typeparam name="V"></typeparam>
    public abstract class UGUIWnd<V> : UGUILoadWnd<V>
        where V : BasicView
    {
        private Transform m_parentTransform;
        protected UGUIWnd(LocalResAssetObject _assetObj,UiLayoutType _layoutType,UiRootType _rootType =UiRootType.Default) : base(_assetObj)
        {
            var root = Singleton<UIRootMgr>.Instance.GetRoot(_rootType);
            m_parentTransform = root?.GetParentTransform(_layoutType);
        }
        protected override Transform ParentTransform
        {
            get { return m_parentTransform; }
        }
    }
}